package com.youease.chris.control
{
	import com.youease.chris.view.mediator.MapEditMediator;
	import com.youease.chris.view.mediator.TexturePanelMediator;
	
	import org.puremvc.as3.interfaces.ICommand;
	import org.puremvc.as3.interfaces.INotification;
	import org.puremvc.as3.patterns.command.SimpleCommand;
	
	public class CreateTextureCommand extends SimpleCommand implements ICommand
	{
		public static const CREATE_TEXTURE:String = "create_Texture";
		public static const TEXTURE_NAME_NULL:String = "texture_name_null";
		public static const CREATE_TEXTURE_COMPLETE:String = "create_texture_complete";
		
		public function CreateTextureCommand()
		{
			super();
		}
		
		override public function execute(notification:INotification):void {
			this.facade.registerMediator(new TexturePanelMediator((this.facade.retrieveMediator(MapEditMediator.NAME) as MapEditMediator).mapEdit.texturePanel));
			sendNotification(CREATE_TEXTURE_COMPLETE);
		}
	}
}